﻿{% extends "gma/base.html" %}
{% load mytag %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__bd">
    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__hd"> 用户列表({{ targets|length }}) </div>
        <div class="weui-panel__bd">
            {% for user in targets %}
                {% if user.uid == uid %}
                    <a href="{% url 'gma:private_message_detail' user.touid user.uid %}" class="weui-media-box weui-media-box_appmsg weui-cell_access">
                        <div class="weui-media-box__hd">
                            <img class="weui-media-box__thumb avatar" src="{{ user.avatar|cdn }}" alt="">
                        </div>
                        <div class="weui-media-box__bd">
                            <h4 class="weui-media-box__title">{{ user.touid }} {{ user.nickname }} </h4>
                            <p class="weui-media-box__desc">{{ user.create_time|date:"Y-m-d H:i:s" }}</p>
                            <p class="weui-media-box__desc">{{ user.message }}</p>
                        </div>

                        <div class="weui-cell__ft">
                            <span>
                                {% if user.is_readed == 0 %}
                                <i class="fa fa-question-circle red_color" style="font-size: 22px"></i>
                                {% else %}
                                <i class="fa fa-check-circle green_color" style="font-size: 22px"></i>
                                {% endif %}
                            </span>
                        </div>
                    </a>
                {% else  %}
                    <a href="{% url 'gma:private_message_detail' user.uid user.touid %}" class="weui-media-box weui-media-box_appmsg weui-cell_access">
                        <div class="weui-media-box__hd">
                            <img class="weui-media-box__thumb avatar" src="{{ user.avatar|cdn }}" alt="">
                        </div>
                        <div class="weui-media-box__bd">
                            <h4 class="weui-media-box__title">{{ user.uid }} {{ user.nickname }} </h4>
                            <p class="weui-media-box__desc">{{ user.create_time|date:"Y-m-d H:i:s" }}</p>
                            <p class="weui-media-box__desc">{{ user.message }}</p>
                        </div>

                        <div class="weui-cell__ft">
                            <span>
                                {% if user.is_readed == 0 %}
                                <i class="fa fa-question-circle red_color" style="font-size: 22px"></i>
                                {% else %}
                                <i class="fa fa-check-circle green_color" style="font-size: 22px"></i>
                                {% endif %}
                            </span>
                        </div>
                    </a>
                {% endif  %}
            {% endfor %}

            <div class="weui-media-box weui-media-box_text">
                <ul class="weui-media-box__info">
                    <li class="weui-media-box__info__meta"> 共有 {{ targets|length }} 名用户 </li>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
{% endblock extra_js %}